﻿<!--{inc(header.view.html)}-->

<div class="header">    
  
                       <div class="nav">
	                                 <ul id="nav_list">
                                                 <li><a href="#" class="nav_icon" target="mainframe">权限列表</a></li>                            


	                                 </ul>
                       </div>
                
</div>






<div id="content">
                       <h1>权限列表</h1>
                       <div>
                                     <div class="tips_show"><img class="img_light" src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b>
                                                            <span ></span>
                                     </div>


                                    <form name="form_work" method="post" action="?app=user&act=powerpost">

                                     <table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="table_style">
                                     <tr>
	                                       <td  align="center" class="bold" >当前用户:&nbsp;&nbsp;{$username}</td>
	                                       <td class="bold">&nbsp;文件包:&nbsp;&nbsp;{$pname}</td>

                                     </tr>
                                     
                                     
                                  
                                     
                                  <?php foreach((array)$powerdata as $_key => $_value ) { ?>

                                     <tr onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'">
			                               <td align="center" >{$_value.name}</td>
									       <td valign="middle" style=" vertical-align:middle">
                                           <?php foreach((array)$_value.act as $_key1 => $_value1 ) { ?>
                                           <?php if (!isset($_value.catid)) { $_value.catid='0'; } ?>
                                           
                                           <input type="checkbox" name="power[]" value="{$_value.app}|{$_key1}|{$_value.catid}"<?php if (powercheck($_value.app , $_key1 ,$pname , $_value.catid )) { ?> checked="checked"<?php } ?>>&nbsp;{$_value1} &nbsp;

                                           <?php } ?> 
                                           </td>
                                    </tr>
                                    
                                <?php } ?>
                                     
                                    <tr>
	                                       <td align="center" colspan="2"> <a href="javascript:" onClick="CheckAll('all')">全选</a>/<a href="javascript:" onClick='CheckAll()'>反选</a>&nbsp;&nbsp;<input type="hidden" name="v" value="{$pname}" /><input type="hidden" name="id" value="{$userid}" /><input type="submit" value=" 提 交 " class="buton"></td>

                                   </tr>
                                   </table>
                                   </form>
<SCRIPT LANGUAGE="JavaScript">
<!--
function postdo(va){
	document.form_work.jobs.value=va
	document.form_work.submit();
}
function CheckAll(va){
	form=document.form_work
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</SCRIPT>                                   
                                 
                  </div>
</div>


<!--{inc(footer.view.html)}-->